home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atari Mega Archive 2
/
Atari Mega Archive CD - Volume 2.iso
/
8bit
/
cislib_a
/
head.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1995-04-22
|
592b
|
33 lines
PROGRAM Head;
(*
by Erik C. Warren, 14 January, 1987
for UPDATE...KYAN's Jan./Feb. issue
*)
TYPE
PathString = ARRAY[1..15] OF Char;
VAR
fn : PathString;
nl,lr : Integer;
inf : Text;
BEGIN
Write('head file : ');
ReadLn(fn);
Write('# of lines: ');
ReadLn(nl);
Reset(inf,fn);
Write(inf^);
FOR lr := 2 TO nl DO
BEGIN
Get(inf);
Write(inf^);
WHILE NOT EOLn(inf) DO
BEGIN
Get(inf);
Write(inf^)
END; (* WHILE inf *)
WriteLn
END; (* FOR lr *)
WriteLn;
WriteLn(nl,' lines typed from ',fn)
END. (* PROGRAM *)